import * as React from "react";
import {PropTypes} from "react";
import { RegisterPage } from "../root";
import {schema as ListSchema} from './list';
import {schema as editSchema} from './edit';
import {schema as createSchema} from './create';
import {schema as orderSchema} from './order';
import {schema as bannerSchema} from './banner';
import BuySafe from './buy';


RegisterPage({
    path: "safe_plan",
    label: "志愿保障",
    icon: "fa fa-user-secret",
    acl: 'safe_plan:buy',
    children: [
        {
            path: "/safe_plan/buy(/:id)",
            label: "购买保险",
            component: BuySafe,
            acl: 'safe_plan:buy',
            url: "/safe_plan/buy"
        },
        {
            path: "order",
            label: "订单列表",
            schema: orderSchema,
            acl: 'safe_plan:order',
            url: "/safe_plan/order"
        },
        {
            path: "banner",
            label: "Banner",
            schema: bannerSchema,
            acl: 'safe_plan:banner',
            url: "/safe_plan/banner"
        },
        {
            path: "list",
            label: "保险方案管理",
            schema: ListSchema,
            acl: 'safe_plan:admin',
            url: "/safe_plan/list"
        },
        
        {
            path: "/safe_plan/edit/:id",
            label: "修改保险方案",
            acl: 'safe_plan:admin',
            schema: editSchema
        },
        
        {
            path: "/safe_plan/create",
            label: "新建保险方案",
            acl: 'safe_plan:admin',
            schema: createSchema,
            url: "/safe_plan/create"
        }
    ]
});
